package de.mpii.test;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexTester {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		final String regex = "[12]\\d{3}";

		Pattern pattern = Pattern.compile(regex);

		Matcher matcher = pattern.matcher("German, 1552 - 1615");

		while (matcher.find()) {
			System.out.println(matcher.group());
		}
	}

}
